/*
 * Copyright (c) www.bugull.com
 */

package com.bugull.farm.core.store;

import com.bugull.mongo.SimpleEntity;
import com.bugull.mongo.annotations.EnsureIndex;
import com.bugull.mongo.annotations.Entity;
import com.bugull.mongo.annotations.Ref;

import java.util.Date;

/**
 * 设备配置
 * @author baoyb(baoyb@ohbuy.net)
 */
@Entity
@EnsureIndex(value="{user:1},{macAddress:1}")
public class WifiDevice extends SimpleEntity {

	private String deviceName;//设备名称
	private String macAddress;//关联设备
	private String label;//标签
	
	private String companyCode;//厂家代码
	private String deviceType;//设备类型
	private String authCode;//授权码
	private String address;//地址-device.city
	private String userType;//用户类型 1：主用户 2：子用户
	private Date createTime;//创建时间
	private Date modifyTime;//操作时间

	@Ref(cascade="R")
	private User user;

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public WifiDevice() {

	}

	public WifiDevice(String id) {
		this.id = id;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public String getCompanyCode() {
		return companyCode;
	}

	public void setCompanyCode(String companyCode) {
		this.companyCode = companyCode;
	}

	public String getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(String deviceType) {
		this.deviceType = deviceType;
	}

	public String getAuthCode() {
		return authCode;
	}

	public void setAuthCode(String authCode) {
		this.authCode = authCode;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

}
